package main

import "fmt"

func createEvenGenerator() func() uint {
	i := uint(0)

	return func() (retVal uint) {
		retVal = i
		i += 2
		return
	}
}

func main() {
	//var base = 0

	//inc := func() {
	//	base += 1
	//}

	//fmt.Println(base)
	//inc()
	//fmt.Println(base)

	nextEven := createEvenGenerator()
	fmt.Println(nextEven())
	fmt.Println(nextEven())
	fmt.Println(nextEven())

}
